package cn.zl.ymcc.controller;

import cn.zl.ymcc.doc.CourseDoc;
import cn.zl.ymcc.result.Result;
import cn.zl.ymcc.service.ESCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/es")
public class ESCourseController {
    @Autowired
    private ESCourseService esCourseService;
    @PostMapping("/save")
    public Result save(List<CourseDoc> list) {
        esCourseService.save( list);
        return Result.success();
    }
}
